/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package persistencia;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class Conexao {

    private Connection con;
    private PreparedStatement pstm;
    private ResultSet rs;

    public Conexao() throws SQLException {
        DriverManager.registerDriver(new org.postgresql.Driver());
        this.con = DriverManager.getConnection("jdbc:postgresql://loclhost:5433/contas", "postgres", "postgres");
        return this.con;

    }
}

public Connection getConexao(){
if(this.con == null)
this.con = DriverManeger.getConnection()

}
